package com.ailk.cuc.autotestbg.common.utils;

import java.io.File;
import java.io.IOException;
import java.util.Collection;

import org.apache.commons.logging.Log;


public class FileUtils {

	private static Log logger = LogUtils.getLogger(FileUtils.class.getName());
	@SuppressWarnings("unchecked")
	public static void writeLines(File file,String encoding,Collection lines) throws IOException{
		logger.debug("开始写入文件");
		org.apache.commons.io.FileUtils.writeLines(file, encoding, lines);
		logger.debug("写入文件完毕");
	}
	
	public static String readFileToString(File file) throws IOException{
		logger.debug("读取文件");
		return org.apache.commons.io.FileUtils.readFileToString(file);
	}
	
}
